﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body id="body">
    <style>
        .ControlButton{
            text-align:center;
        }
        .ControlButton input{
            padding:5px 15px 4px 15px;
            margin:10px 20px 15px 20px;
        }
    </style>
    <div id="title" style="text-align:center;">
        标题
    </div>
    <div class="ControlButton">
        <div>
            <input type="button" onclick="PrevDirectory()" value="上一章" />
            <input type="button" onclick="ReturnDirectory()" value="返回目录" />
            <input type="button" onclick="NextDirectory()" value="下一章" />
        </div>
    </div>
    <div id="text" style="color:darkslategrey">
        正文
    </div>
    <div class="ControlButton">
        <div>
            <input type="button" onclick="PrevDirectory()" value="上一章" />
            <input type="button" onclick="ReturnDirectory()" value="返回目录" />
            <input type="button" onclick="NextDirectory()" value="下一章" />
        </div>
    </div>
</body>
</html>
<script>
    function PrevDirectory() {
        window.external.PrevDirectoryGo();
    }
    function ReturnDirectory() {
        window.external.ReturnDirectoryGo();
    }
    function NextDirectory() {
        window.external.NextDirectoryGo();
    }
    window.onload = function () {
        window.external.web_Text_Init();
    }
    //修改控件文本
    function SetText(el,txt) {
        document.getElementById(el).innerText = txt;
    }
    //修改背景色
    function SetBackground(el, color) {
        document.getElementById(el).style.background = color;
    }
    //修改文字
    function SetFont(el,font) {
        var selectEl = document.getElementById(el);
        selectEl.style.fontFamily = font["Name"];
        selectEl.style.fontSize = font["Size"] + "px";
        if (font["Bold"]) {
            selectEl.style.fontWeight = "bold";
        }
        else {
            selectEl.style.fontWeight = "normal";
        }
        selectEl.style.lineHeight = (font["Size"] * 1.5) + "px"
    }
    //修改内边距
    function SetPadding(el, padding) {
        var selectEl = document.getElementById(el);
        selectEl.style.padding = padding;
    }
    //修改背景色
    function SetBackgroundColor(el, color) {
        var selectEl = document.getElementById(el);
        selectEl.style.backgroundColor = color;
    }
    //修改背景色
    function SetTextColor(el, color) {
        var selectEl = document.getElementById(el);
        selectEl.style.color = color;
    }
</script>